package com.xmsx.back.pojo;

import java.sql.Date;
import java.util.Objects;

public class Job {

    private int id;
    private String title;
    private Date ddl;
    private String website;
    private String email;
    private String content;
    private Date datetime;

    public Job() {}

    public Job(String title, Date ddl) {
        this.title = title;
        this.ddl = ddl;
    }

    public Job(int id, String title, Date ddl, String website, String email, String content, Date datetime) {
        this.id = id;
        this.title = title;
        this.ddl = ddl;
        this.website = website;
        this.email = email;
        this.content = content;
        this.datetime = datetime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Date getDdl() {
        return ddl;
    }

    public void setDdl(Date ddl) {
        this.ddl = ddl;
    }

    public String getWebsite() {
        return website;
    }

    public void setWebsite(String website) {
        this.website = website;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getDatetime() {
        return datetime;
    }

    public void setDatetime(Date datetime) {
        this.datetime = datetime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Job)) return false;
        Job job = (Job) o;
        return getId() == job.getId() &&
                Objects.equals(getTitle(), job.getTitle()) &&
                Objects.equals(getDdl(), job.getDdl()) &&
                Objects.equals(getWebsite(), job.getWebsite()) &&
                Objects.equals(getEmail(), job.getEmail()) &&
                Objects.equals(getContent(), job.getContent()) &&
                Objects.equals(getDatetime(), job.getDatetime());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId(), getTitle(), getDdl(), getWebsite(), getEmail(), getContent(), getDatetime());
    }

    @Override
    public String toString() {
        return "Job{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", ddl=" + ddl +
                ", website='" + website + '\'' +
                ", email='" + email + '\'' +
                ", content='" + content + '\'' +
                ", datetime=" + datetime +
                '}';
    }
}
